]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
screenShield: Emit ::screen-lock-shown early with animated fades
authorCarlos Garnacho <carlosg@gnome.org>
Fri, 21 Nov 2025 13:46:03 +0000 (14:46 +0100)
committerCarlos Garnacho <carlosg@gnome.org>
Fri, 21 Nov 2025 16:35:43 +0000 (16:35 +0000)
If the screen is locked with animatedFade parameter enabled, the
screenShield currently defers the emission of this signal until the
lightbox toggles on. However the lightbox might be prevented from
ever doing that by later input.

If this emission is delayed enough, it will result in ShellDBus
missing the D-Bus timeout for replying to the Lock request, since
it does rely on this signal being emitted in order to reply back.

It does however make sense to keep setting the active state after
the animation, so the inhibitors are synchronized at the point the
lightbox kicks in.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/8644
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3971>

js/ui/screenShield.js

index a99bd58b98a611e8592f3d3bf6b79769834f25fc..2e3b33197ed16da5e9907808743a3091f60e2d07 100644 (file)
@@ -340,7 +340,7 @@ export class ScreenShield extends Signals.EventEmitter {
 
     _onShortLightbox(lightBox) {
         if (lightBox.active)
-            this._completeLockScreenShown();
+            this._setActive(true);
     }
 
     showDialog() {
@@ -514,12 +514,9 @@ export class ScreenShield extends Signals.EventEmitter {
             if (params.fadeToBlack)
                 this._activateFade(this._shortLightbox, 0);
 
-            this._completeLockScreenShown();
+            this._setActive(true);
         }
-    }
 
-    _completeLockScreenShown() {
-        this._setActive(true);
         this.emit('lock-screen-shown');
     }